using Edytor.ModelViews;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Practices.ServiceLocation;

namespace Edytor.ViewModel
{
    public class ViewModelLocator
    {
        public ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
            SimpleIoc.Default.Register<MainWindowModelView>();
            SimpleIoc.Default.Register<NewMapWindowModelView>();
        }

        public MainWindowModelView MainWindowModel
        {
            get { return ServiceLocator.Current.GetInstance<MainWindowModelView>(); }
        }

        public NewMapWindowModelView NewMapModel
        {
            get {return ServiceLocator.Current.GetInstance<NewMapWindowModelView>(); }
        }
        
        public static void Cleanup()
        {
        }
    }
}